xend: Support "bootloader" mode for "drbd:" devices
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Sep 2009 07:42:10 +0000 (08:42 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Sep 2009 07:42:10 +0000 (08:42 +0100)
commite4e14402c14addda748464495db705f2ce08bb80
treeba2ee10dc8390fd5ddc5f49f41e568c62d62147f
parent35c865110a8a8a7981ad5184c02ab06923495b33
xend: Support "bootloader" mode for "drbd:" devices

To be able to use "bootloader" on drbd devices the following changes
need to be made:

*) Translation of devicename

_parse_uname which is used by blkdev_uname_to_file which is again used
by _configureBootloader in XendDomainInfo needs to be able to resolve
drbd resources to the corresponding blockdevice to feed to the
configured bootloader.

*) Activation of drbd device

If the drbd device isn't in Primary mode when the bootloader tries to
fetch the kernel and initrd, the start of the DomU will fail. To
prevent this the given drbd device will be made Primary before the
bootloader gets executed.

A note on the naming of drbd resouces: drbd uses mostly resource names
in it's userland tools. Because of that drbd VBDs, if configured with
the "drbd:" type, should always use the drbd resource name as
suggested by the drbd documentation at
http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html. My
patches assume that the VBDs are named accordingly.

Signed-off-by: Michael Renner <michael.renner@geizhals.at>
tools/python/xen/util/blkif.py
tools/python/xen/xend/XendDomainInfo.py